Table of Contents Previous Section

Application.wos

Application.wos is the application script for the Visitors application. It declares two global variables: visitorNum and lastVisitor. Global variables are visible throughout the application, and they live for the duration of the application.

id lastVisitor;    
  // the most recent visitor
  
id visitorNum;    
  // the total number of visitors the page
  
- awake {
  // Obsolete sessions that have been inactive for more than 2 minutes
   [WOApp setSessionTimeOut:120];
   visitorNum = 0; 
}

Table of Contents Next Section